package com.yao.shardingdemo.service.impl;

import com.yao.shardingdemo.entity.Order;
import com.yao.shardingdemo.mapper.OrderMapper;
import com.yao.shardingdemo.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Henry Yao
 */
@Service
public class OrderServiceImpl implements OrderService {
    private final OrderMapper orderMapper;

    @Autowired
    public OrderServiceImpl(OrderMapper orderMapper) {
        this.orderMapper = orderMapper;
    }

    @Override
    public void insertOrder(Order order) {
        orderMapper.insertOrder(order);
    }
}
